<template>
	<view class="bottom_content" :class="{bottom_content_index:is_show}">
		<view class="show_bg" v-if="is_show" @tap="switchBtn" catchtouchmove="false">
			<view class="show_bg_content">
				<view class="show_bg_item" @tap.stop="switchBtn(1)">
					<view class="show_head_art"><i class="iconfont iconwenzhang1 "></i></view>
					<view class="text">文章</view>
				</view>
				<view class="show_bg_item" @tap.stop="switchBtn(0)">
					<view class="show_head_video"><i class="iconfont iconshipin2 "></i></view>
					<view class="text">视频</view>
				</view>

				<view class="show_bg_item" @tap.stop="switchBtn(2)">
					<view class="show_head_live"><i class="iconfont iconzhibo"></i></view>
					<view class="text">直播</view>
				</view>
			</view>

		</view>
		<view v-else class="show_bg_btn" @tap="switchBtn"><i class="iconfont iconfabu"></i></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				is_show: false
			}
		},
		props: {
			buttomIndex: Number
		},
		methods: {
			/* 切换发布状态 */
			switchBtn(type) {
				this.is_show = !this.is_show;
				var url = '';
				if (type == 0) {
					url = 'release'
				} else if (type == 1) {
					url = '../articleModule/newarticle-release'
				}else if (type == 2) {
					url = ''
				}
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss">
	.bottom_content {
		position: fixed;
		bottom: 0;
		z-index: 10;
	}

	.bottom_content_index {
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 999;
	}

	/* 蒙版 */
	.show_bg {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 99;
		background-color: rgba(0, 0, 0, 0.5);
	}

	.show_bg_content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		bottom: 120upx;
		right: 0;
		width: 150upx;

		.show_bg_item {
			color: #FFFFFF;
			text-align: center;
			margin-top: 60upx;

			.text {
				margin-top: 20upx;
				font-size: 30upx;
				color: #FFFFFF;
			}

			.show_head_video {
				width: 92upx;
				height: 92upx;
				line-height: 92upx;
				background: linear-gradient(180deg, rgba(104, 229, 131, 1) 0%, rgba(38, 201, 157, 1) 100%);
				border-radius: 50%;

				& i {
					font-size: 70upx;
				}
			}

			.show_head_art {
				width: 92upx;
				height: 92upx;
				line-height: 92upx;
				background: linear-gradient(360deg, rgba(254, 118, 91, 1) 0%, rgba(254, 185, 104, 1) 100%);
				border-radius: 50%;

				& i {
					font-size: 50upx;
				}
			}

			.show_head_live {
				width: 92upx;
				height: 92upx;
				line-height: 92upx;
				background: linear-gradient(360deg, #7286FE 0%, #50C3FF 100%);
				border-radius: 50%;
				
				& i {
					font-size: 52upx;
				}
			}
		}
	}

	.show_bg_btn {
		position: fixed;
		bottom: 120upx;
		right: 40upx;
		text-align: center;
		width: 92upx;
		height: 92upx;
		line-height: 40px;
		border-radius: 50%;
		background: linear-gradient(180deg, rgba(104, 229, 131, 1) 0%, rgba(38, 201, 157, 1) 100%);
		box-shadow: 0px 6upx 12upx rgba(0, 0, 0, 0.16);
		display: flex;
		align-items: center;
		justify-content: center;

		& i {
			color: #FFFFFF;
			font-size: 60upx;
		}
	}
</style>
